import request from '@/config/axios'

// 教学团队 VO
export interface TeacherTeamVO {
  // 编号
  id: number
  // 团队名称
  teamName: string
  // 团队负责人
  teamHead: string
  // 团队成员
  teamMember: string
  // 级别
  level: number
  // 获得时间
  awardDate: Date
  // 备注
  remark: string
  // 状态
  status: number
  // 审核未通过原因
  reason: string
}

// 教学团队 API
export const TeacherTeamApi = {
  // 查询教学团队分页
  getTeacherTeamPage: async (params: any) => {
    return await request.get({ url: `/data/teacher-team/page`, params })
  },

  // 查询教学团队详情
  getTeacherTeam: async (id: number) => {
    return await request.get({ url: `/data/teacher-team/get?id=` + id })
  },

  // 新增教学团队
  createTeacherTeam: async (data: TeacherTeamVO) => {
    return await request.post({ url: `/data/teacher-team/create`, data })
  },

  // 修改教学团队
  updateTeacherTeam: async (data: TeacherTeamVO) => {
    return await request.put({ url: `/data/teacher-team/update`, data })
  },

  // 修改教学团队
  updateTeacherTeamStatus: async (data) => {
    return await request.put({ url: `/data/teacher-team/updateStatus`, data })
  },

  // 删除教学团队
  deleteTeacherTeam: async (id: number) => {
    return await request.delete({ url: `/data/teacher-team/delete?id=` + id })
  },

  // 导出教学团队 Excel
  exportTeacherTeam: async (params) => {
    return await request.download({ url: `/data/teacher-team/export-excel`, params })
  }
}
